package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.mall.lib.domain.enumclass.SMSEventType;
import com.rockcent.mall.lib.domain.enumclass.TerminalType;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by ISSUSER on 2016/11/8 0008.
 */
@Entity
@Table(name = "smsevent")
@DynamicInsert
@DynamicUpdate
public class SMSEvent extends IDEntityMall {
    @Column(columnDefinition = "bit comment'发送结果'")
    private boolean executeResult;
    @Column(columnDefinition = "varchar(255) comment'事件类型'")
    @Enumerated(EnumType.STRING)
    private SMSEventType eventType;
    @Column(columnDefinition = "varchar(255) comment'终端'")
    @Enumerated(EnumType.STRING)
    private TerminalType fromTerminal;
    @Column(columnDefinition = "varchar(255) comment'电话号码'")
    private String keyInfo;
    @Column(columnDefinition = "varchar(255) comment'平台名称'")
    private String mallName;
    @Column(columnDefinition = "varchar(255) comment'发送对象'")
    private  String triggerMan;

    public boolean isExecuteResult() {
        return executeResult;
    }

    public void setExecuteResult(boolean executeResult) {
        this.executeResult = executeResult;
    }

    public SMSEventType getEventType() {
        return eventType;
    }

    public void setEventType(SMSEventType eventType) {
        this.eventType = eventType;
    }

    public TerminalType getFromTerminal() {
        return fromTerminal;
    }

    public void setFromTerminal(TerminalType fromTerminal) {
        this.fromTerminal = fromTerminal;
    }

    public String getKeyInfo() {
        return keyInfo;
    }

    public void setKeyInfo(String keyInfo) {
        this.keyInfo = keyInfo;
    }

    public String getMallName() {
        return mallName;
    }

    public void setMallName(String mallName) {
        this.mallName = mallName;
    }

    public String getTriggerMan() {
        return triggerMan;
    }

    public void setTriggerMan(String triggerMan) {
        this.triggerMan = triggerMan;
    }

    @Override
    public String toString() {
        return "SMSEvent{" +
                "executeResult=" + executeResult +
                ", eventType=" + eventType +
                ", fromTerminal=" + fromTerminal +
                ", keyInfo='" + keyInfo + '\'' +
                ", mallName='" + mallName + '\'' +
                ", triggerMan='" + triggerMan + '\'' +
                '}';
    }
}
